package com.healthy.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.education.mapper.UserCoursePurchasesMapper;
import com.healthy.education.domain.UserCoursePurchases;
import com.healthy.education.service.IUserCoursePurchasesService;

/**
 * 课程购买记录Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserCoursePurchasesServiceImpl implements IUserCoursePurchasesService 
{
    @Autowired
    private UserCoursePurchasesMapper userCoursePurchasesMapper;

    /**
     * 查询课程购买记录
     * 
     * @param id 课程购买记录主键
     * @return 课程购买记录
     */
    @Override
    public UserCoursePurchases selectUserCoursePurchasesById(Long id)
    {
        return userCoursePurchasesMapper.selectUserCoursePurchasesById(id);
    }

    /**
     * 查询课程购买记录列表
     * 
     * @param userCoursePurchases 课程购买记录
     * @return 课程购买记录
     */
    @Override
    public List<UserCoursePurchases> selectUserCoursePurchasesList(UserCoursePurchases userCoursePurchases)
    {
        return userCoursePurchasesMapper.selectUserCoursePurchasesList(userCoursePurchases);
    }

    /**
     * 新增课程购买记录
     * 
     * @param userCoursePurchases 课程购买记录
     * @return 结果
     */
    @Override
    public int insertUserCoursePurchases(UserCoursePurchases userCoursePurchases)
    {
        return userCoursePurchasesMapper.insertUserCoursePurchases(userCoursePurchases);
    }

    /**
     * 修改课程购买记录
     * 
     * @param userCoursePurchases 课程购买记录
     * @return 结果
     */
    @Override
    public int updateUserCoursePurchases(UserCoursePurchases userCoursePurchases)
    {
        return userCoursePurchasesMapper.updateUserCoursePurchases(userCoursePurchases);
    }

    /**
     * 批量删除课程购买记录
     * 
     * @param ids 需要删除的课程购买记录主键
     * @return 结果
     */
    @Override
    public int deleteUserCoursePurchasesByIds(Long[] ids)
    {
        return userCoursePurchasesMapper.deleteUserCoursePurchasesByIds(ids);
    }

    /**
     * 删除课程购买记录信息
     * 
     * @param id 课程购买记录主键
     * @return 结果
     */
    @Override
    public int deleteUserCoursePurchasesById(Long id)
    {
        return userCoursePurchasesMapper.deleteUserCoursePurchasesById(id);
    }
}
